from coord_convert.transform import wgs2gcj, wgs2bd, gcj2wgs, gcj2bd, bd2wgs, bd2gcj
import json

with open('formattedGH0302.json','r') as fr:
    all = json.loads(fr.read())
newAll = {'gh':[]}
for each in all['gynecologicalHospitals'][0]:
    lat = each['lat']
    lng = each['lng']

    newLon, newLat = gcj2wgs(lng, lat)
    each['lng8'] = round(newLon, 6)
    each['lat8'] = round(newLat, 6)
    newAll['gh'].append(each)
with open('gh10.json','w') as fw:
    fw.write(json.dumps(newAll, separators=(',',':'), ensure_ascii=False))